package com.guyj.baseapp.demo.imagepick;

import android.support.v7.widget.RecyclerView;

import com.guyj.baseapp.R;
import com.guyj.common.utils.ImageLoadManager;

import cn.bingoogolapple.androidcommon.adapter.BGARecyclerViewAdapter;
import cn.bingoogolapple.androidcommon.adapter.BGAViewHolderHelper;
import cn.finalteam.galleryfinal.model.PhotoInfo;

/**
 * 显示图片的grid适配器，使用了ImageLoadManager工具类下的图片加载方法
 * compile 'cn.bingoogolapple:bga-adapter:1.1.0@aar'
 */
class ImagePickAdapter extends BGARecyclerViewAdapter<PhotoInfo> {

    public ImagePickAdapter(RecyclerView recyclerView, int itemLayoutId) {
        super(recyclerView, itemLayoutId);
    }

    @Override
    protected void fillData(BGAViewHolderHelper holder, int i, PhotoInfo info) {
        ImageLoadManager.intoForImagePicker(info.getPhotoPath(),holder.getImageView(R.id.iv_grid),R.mipmap.ic_launcher,R.mipmap.ic_launcher);
    }

}
